gtk/window: Only deal with shadow when (ex|in)cluding csd size
authorJonas Ådahl <jadahl@gmail.com>
Wed, 2 Dec 2020 16:42:42 +0000 (17:42 +0100)
committerJonas Ådahl <jadahl@gmail.com>
Mon, 7 Dec 2020 08:46:39 +0000 (09:46 +0100)
The size should correspond what gtk_widget_measure() does, and it
measures what's within the window excluding the shadow; so make this
helper function correspond to this.

gtk/gtkwindow.c

index 5f7e363c22ed7482384e3452d7f43d8d82cdcb17..4660dd40ce0569a875f51933441c5cf8fb4c0792 100644 (file)
@@ -3307,19 +3307,6 @@ gtk_window_update_csd_size (GtkWindow *window,
   w = *width + apply * (window_border.left + window_border.right);
   h = *height + apply * (window_border.top + window_border.bottom);
 
-  if (priv->title_box != NULL &&
-      gtk_widget_get_visible (priv->title_box) &&
-      gtk_widget_get_child_visible (priv->title_box))
-    {
-      int minimum_height;
-      int natural_height;
-
-      gtk_widget_measure (priv->title_box, GTK_ORIENTATION_VERTICAL, -1,
-                          &minimum_height, &natural_height,
-                          NULL, NULL);
-      h += apply * natural_height;
-    }
-
   /* Make sure the size remains acceptable */
   if (w < 1)
     w = 1;